CC = gcc
CPP = g++
RM = rm

SRC_PATH := .

TARGET := pr_check

CFLAGS += $(foreach dir, $(INCLUDE_PATH), -I$(dir))
SRCS += $(wildcard $(SRC_PATH)/*.cpp)
OBJS := $(notdir $(SRCS:.cpp=.o))

build:
	$(CPP) -c $(CFLAGS) $(SRCS)
	$(CPP) $(CFLAGS) -o $(TARGET) $(OBJS)
	$(RM) $(OBJS) 

clean:
	$(RM) $(OBJS) $(TARGET)

run:
	./$(TARGET)

facebook_run:
	./$(TARGET) ../../data/edge_off_facebook.txt ../ori_pagerank/facebook_ori_pr_result.txt ../../result/facebook_pr.txt

wiki_run:
	./$(TARGET) ../../data/edge_off_wiki.txt ../ori_pagerank/wiki_ori_pr_result.txt ../../result/wiki_pr.txt

gplus_run:
	./$(TARGET) ../../data/edge_off_gplus.txt ../ori_pagerank/gplus_ori_pr_result.txt ../../result/gplus_pr.txt

orkut_run:
	./$(TARGET) ../../data/edge_off_orkut.txt ../ori_pagerank/orkut_ori_pr_result.txt ../../result/orkut_pr.txt

rmat19_run:
	./$(TARGET) ../../data/edge_off_rmat19.txt ../ori_pagerank/rmat19_ori_pr_result.txt ../../result/rmat19_pr.txt

rmat20_run:
	./$(TARGET) ../../data/edge_off_rmat20.txt ../ori_pagerank/rmat20_ori_pr_result.txt ../../result/rmat20_pr.txt

rmat21_run:
	./$(TARGET) ../../data/edge_off_rmat21.txt ../ori_pagerank/rmat21_ori_pr_result.txt ../../result/rmat21_pr.txt

rmat22_run:
	./$(TARGET) ../../data/edge_off_rmat22.txt ../ori_pagerank/rmat22_ori_pr_result.txt ../../result/rmat22_pr.txt